
<link rel="stylesheet" type="text/css" href="/public/store/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="/public/store/daterangepicker-bs3.css">
<ol class="breadcrumb">
    <li><a href="/store">KTV管理</a></li>
    <li class="active"><a href="/store/print">打印管理</a></li>
</ol>
<!-- seat end -->
<div class="row">
    <div class="container-fluid">
        
    </div>
    <!-- rightcont end -->
</div>

<script type="text/html" id="list_tmpl">
    <div class="grid container-fluid fromhead middle">
        <div class="g-col list-total">您当前已添加了 {{totalRow}} 条信息</div>
        <div>
            <span class="btn gn_btn blue edit">新建打印机</span>
        </div>
    </div>
    <table class="table table-bordered from_table">
        <tr>
            <th class="text-center">ID</th>
            <th class="text-center">名称</th>
            <th class="text-center">IP地址</th>
            <th class="text-center">操作</th>
        </tr>
        {{each dataList as li i}}
        <tr>
            <td class="text-center">{{li.id}}</td>
            <td class="text-center">{{li.place}}</td>
            <td class="text-center">{{li.ip}}</td>
            <td class="text-center">
             <p class="hand blue edit" data-i="{{i}}">修改</p>
             <span class="print green hand" title="打印测试" data-i="{{i}}">测试</span>
            </td>
        </tr>
        {{/each}}
    </table>
    {{if totalPage>1}}
    <nav class="text-right">
        <ul class="pagination">
            {{if pageNumber>1}}
            <li>
                <a href="?pi={{pageNumber-1}}" aria-label="Previous">
                    <span aria-hidden="true">上一页</span>
                </a>
            </li>
            {{/if}}
            {{for var i = pageNumber-5; i < pageNumber + 5; i++}}
            {{if i>0 && i <= totalPage}}
            <li{{if i == pageNumber}} class="active"{{/if}}><a href="?pi={{i}}">{{i}}</a></li>
            {{/if}}
            {{/for}}
            {{if pageNumber<totalPage}}
            <li>
                <a href="?pi={{pageNumber+1}}" aria-label="Next">
                    <span aria-hidden="true">下一页</span>
                </a>
            </li>
            {{/if}}
        </ul>
    </nav>
    {{/if}}
</script>

<script type="text/html" id="edit_tmpl">
    <table class="table from_table" style="width:450px;">
        <tr>
            <td class="input_title required" width="140">打印名称</td>
            <td>
                <input type="hidden" value="{{id}}" name="id" />
                <input required errmsg="请输入打印名称" type="text" class="form-control" placeholder="请输入打印名称" name="place" value="{{place}}"{{if id==1}} disabled{{/if}}>
            </td>
        </tr>
        <tr>
            <td class="input_title required" width="140">打印IP</td>
            <td>
                <input required errmsg="请输入打印排序" type="text" min="0" class="form-control" placeholder="请输入打印排序" name="ip" value="{{ip}}">
            </td>
        </tr>
    </table>
</script>

    <!--引入插件js代码-->
<script src="/public/store/moment.js"></script>
<script src="/public/store/daterangepicker.js"></script>
